#ifndef CHECKAC_H
#define CHECKAC_H
#include "include.h"
//#define OUTH   RB5
//#define OUTL	RB1
//#define OUT  heatOut_f
#define BITBAND_REG(Reg,Bit)    (*((uint32_t volatile*)(0x42000000u + (((uint32_t)&(Reg) - (uint32_t)0x40000000u)<<5) + (((uint32_t)(Bit))<<2))))
//  
#define CHECKIN		       BITBAND_REG(GPIOB->IDAT, 1)

#define OUT_ZERO		   BITBAND_REG(GPIOC->IDAT, 0)


#define HeatIO		       BITBAND_REG(GPIOC->ODAT, 7)

//#define OUT                BITBAND_REG(GPIOC->ODAT, 7)

//#define FanIO		       PC1

//#define TurnIO		       PC7

//#define CHECKIN PT1_4
//extern unsigned int HeatCycle,HeatDuty;
//extern unsigned char HeatCount;
extern unsigned char MotoDuty;
extern unsigned char cycleAC;
extern unsigned char cycleFre;
extern unsigned char StartMotoTime;
//extern u8 AcFreHz;
//extern u8 outZeroAcFreHz;
extern u8 towZeroWide;

extern u8 cycleAC;
extern u8 outzeroCycleAC;
extern u8 cycleFre;
extern u8 outzeroCycleFre;
extern u8 AcFreHz;
extern u8 outZeroAcFreHz;
extern _Bool CHECKININ,checkinOld,AcEdge_f;
extern _Bool OUT_ZERO_IN,out_zero_old, zcroEdge_f;

extern _Bool readyRead_f,startRead_f;

extern u8 heatOut_f;

extern  void checkEdge(void);
extern  void checkEdge_init(void);

extern  void out_zero_Edge(void);

extern  void outLib(void);


#endif
